<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateCertificatesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('certificates', function (Blueprint $table) {
            $table->id();
            $table->unsignedInteger('certificate_category_id')->comment("证书类别id");
            $table->string('name')->comment("名称");
            $table->string('issuing_authority')->comment("颁发机构")->nullable();
            $table->string('active_fields')->comment("活跃领域")->nullable();
            $table->string('competency_requirements')->comment("能力要求")->nullable();
            $table->string('image_path',200)->comment('证书图片');
            $table->text('other_description')->comment("其他描述")->nullable();
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('certificates');
    }
}
